package hoowin.basic.dao.springImp;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

public class TestDao extends JdbcDaoSupport {
	public int addEmail(String email){
		String sql = "insert into basic_emails (id, email) values (null, ?)";
		if(super.getJdbcTemplate().update(sql, email)>0){
			return super.getJdbcTemplate().queryForInt("select last_insert_id()");
		}else return 0;
	}
}
